import request from '../api'

// 用户下拉列表
export function getUserList() {
	return request({
		url: '/front/user/list',
		method: 'get',
	})
}
// 登录方法
export function login(username, password) {
	const data = {
		username,
		password,
	}
	return request({
		url: '/front/login',
		headers: {
			isToken: false,
		},
		method: 'post',
		data: data,
	})
}
// 退出登录
export function logout() {
	return request({
		url: '/front/logout',
		method: 'post',
	})
}
// 获取用户详细信息
export function getInfo() {
	return request({
		url: '/front/user/profile',
		method: 'get',
	})
}
// 用户授权
export function authorize(data) {
	return request({
		url: '/front/authorize',
		method: 'post',
		data: data,
	})
}
